Skip to content

Fix get_used_percentage for non-LSO deployments in test_mon_data_avail_warn#15138

Open
amr1ta wants to merge 1 commit into
red-hat-storage:masterfrom
amr1ta:fix-mon-data-avail-warn-non-lso
Open

Fix get_used_percentage for non-LSO deployments in test_mon_data_avail_warn#15138
amr1ta wants to merge 1 commit into
red-hat-storage:masterfrom
amr1ta:fix-mon-data-avail-warn-non-lso

Conversation

@amr1ta
Copy link
Copy Markdown
Contributor

@amr1ta amr1ta commented May 13, 2026

PR #14707 split get_used_percentage() into LSO/non-LSO branches and applied .strip().splitlines()[-1] to the LSO path to extract the data line from df -Th output. The non-LSO else branch was missing this step, causing mount_details.split()[5] to hit 'Use%' from the df header row instead of the actual percentage, raising ValueError: invalid literal for int() with base 10: 'Use'.

Apply the same .strip().splitlines()[-1] to the non-LSO branch.

…l_warn

PR red-hat-storage#14707 split get_used_percentage() into LSO/non-LSO branches and applied
.strip().splitlines()[-1] to the LSO path to extract the data line from
df -Th output. The non-LSO else branch was missing this step, causing
mount_details.split()[5] to hit 'Use%' from the df header row instead of
the actual percentage, raising ValueError: invalid literal for int() with
base 10: 'Use'.

Apply the same .strip().splitlines()[-1] to the non-LSO branch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Amrita Mahapatra <49347640+amr1ta@users.noreply.github.com>
@amr1ta amr1ta requested a review from a team as a code owner May 13, 2026 11:25
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 13, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: amr1ta

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant